import { Router } from '@vaadin/router';
import '@components/x-layout'

const router = new Router(document.body);
router.setRoutes([ 
  {
    path: '/',
    component: 'x-layout',
    children: [
      { path: '', action: async () => await import('@pages/page-home') , component: 'page-home' },
      { path: '/news' , action: async () => await import('@pages/page-news'), component: 'page-news' },
      { path: '/products', action: async () => await import('@pages/page-products'), component: 'page-products' },
      { path: '/about', action: async () => await import('@pages/page-about'), component: 'page-about' },
      { path: '(.*)', action: async () => await import('@components/x-not-found'), component: 'x-not-found' } ]
  },
]);
